function SetHome(obj,vrl){
        try{
            obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
            }
        catch(e){
                if(window.netscape) {
                        try { 
						netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
                        }  
                        catch (e){ 
                                alert("Your Browser does not support ");
                        }
                        var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
                        prefs.setCharPref('browser.startup.homepage',vrl);
                 }
        }
}

function addFavorite(){
    var vDomainName=window.location.href;
    var description=document.title;
    try{//IE
        window.external.AddFavorite(vDomainName,description);
    }catch(e){//FF
        window.sidebar.addPanel(description,vDomainName,"");
    }
}

//图片缩略图效果
function DrawImage(ImgD,FitWidth,FitHeight){
    var image=new Image();
	image.src=ImgD.src;
	if(image.width>0 && image.height>0){
		if(image.width/image.height>= FitWidth/FitHeight){
			if(image.width>FitWidth){
				ImgD.width=FitWidth;
				ImgD.height=(image.height*FitWidth)/image.width;
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			}
		}else{
			if(image.height>FitHeight){
				ImgD.height=FitHeight;
				ImgD.width=(image.width*FitHeight)/image.height;
			}else{
				ImgD.width=image.width; 
				ImgD.height=image.height;
			} 
		}
	}

 }


 function ResumeError() { 
return true; 
} 
window.onerror = ResumeError; 
		function doClick_down(o,s1,s2,c1,c2){
	 o.className="current";
	 var j;
	 var id;
	 var e;
	 for(var i=1;i<=5;i++){
	   id =s1+i;
	   j = document.getElementById(id);
	   e = document.getElementById(s2+i);
	   if(id != o.id){
	   	 j.className=c1;
	   	 e.style.display = "none";
	   }else{
	    j.className=c2;
		e.style.display = "block";
	   }
	 }
	 }